home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Higher Ed / G-M / MacPhaseExtras.sit / MacPhase Extras / Macros / MacPhase Paint.m < prev    next >
Encoding:
Text File  |  1994-05-28  |  569 b   |  24 lines  |  [TEXT/DAHN]

  1. macro MacPhase_Paint.m;
  2. var
  3.     boolean : notDone;
  4.     Str255 : paintName;
  5.     integer : x,y;
  6.     real : fill;
  7. begin
  8.     paintName:='Paint Demo';
  9.     fill:=0;
  10.     NewData(paintName,128,128,1,FALSE);
  11.     PutDataNumber(paintName,1,1,fill);
  12.     PlotData(paintName,'Color Contour Plot',TRUE);
  13.     ShowError('','Use the mouse to draw in the window.  Press Command-Period to stop.');
  14.     SelectData(paintName);
  15.     ForeColor(0,0,0);
  16.     repeat
  17.         notDone:=WaitMouseDown(x,y);
  18.         PutDataNumber(paintName,x,y,fill);
  19.         MoveTo(x,y);
  20.         LineTo(x,y);
  21.     until(!notDone);
  22.     PlotData(paintName,'Color Contour Plot',FALSE);
  23. end;
  24.